package isjinhao.jlox.grammar.statement.represention;

import isjinhao.jlox.grammar.expression.represention.Expression;
import isjinhao.jlox.grammar.statement.visitor.StatementVisitor;
import lombok.Getter;

/**
 * @Author ISJINHAO
 * @Date 2021/2/27 15:40
 */
@Getter
public class Return extends Statement {

    private Expression expression;

    public Return(Expression expression) {
        this.expression = expression;
    }

    @Override
    public <R> R accept(StatementVisitor<R> statementVisitor) {
        return statementVisitor.visitReturn(this);
    }

}
